package com.dxf.database.dbInfo;


import com.dxf.entity.DBType;

/**
 *  数据源封装对象,根据DataBase实例获取数据库的连接
 */

public class DataBase {

    // private String dbType;//数据库类型,mysql,oracle
    private DBType dbType ;
    private String db ;//数据库中表的名称,如test数据库等
    private String userName;//用户名
    private String passWord ;//密码
    private static String ip ;
    private static String port ;
    private String driver;//驱动加载类 mysql;
    private String url;//连接mysql数据库的链接

    public DataBase() {
    }


    public DataBase(DBType dbType, String db, String userName, String passWord, String driver, String url) {
        this.dbType = dbType;
        this.db = db;
        this.userName = userName;
        this.passWord = passWord;
        this.driver = driver;
        this.url = url;
    }



    public DBType getDbType() {
        return dbType;
    }

    public void setDbType(DBType dbType) {
        this.dbType = dbType;
    }

    public String getDb() {
        return db;
    }

    public void setDb(String db) {
        this.db = db;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public static String getIp() {
        return ip;
    }

    public static void setIp(String ip) {
        DataBase.ip = ip;
    }

    public static String getPort() {
        return port;
    }

    public static void setPort(String port) {
        DataBase.port = port;
    }

    public String getDriver() {
        return driver;
    }

    public void setDriver(String driver) {
        this.driver = driver;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
